﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCCategories.ascx.cs" Inherits="WebAppArtreve.views.shared.components.categories.WUCCategories" %>
<%@ Register src="WUCCategoryImage.ascx" tagname="WUCCategoryImage" tagprefix="uc1" %>
<a class="actionbar" href="AddCategory.aspx">
Add category</a>
<asp:ListView ID="ListViewCategory" runat="server" 
DataSourceID="ODSCategoriesALL">
    <LayoutTemplate>
        <article id="itemPlaceholder" runat="server" />
    </LayoutTemplate>
    <ItemTemplate>
        <article>
            <a href="Category.aspx?id=<%# Eval("Id")%>">
            <section class="art-image">            
                <uc1:WUCCategoryImage CategoryId='<%# Eval("Id")%>'  ID="WUCCategoryImage1" runat="server" />                
            </section>
            </a>
            <header>
                <a href="Category.aspx?id=<%# Eval("Id")%>">
                    <h3><%# Eval("Name") %></h3>       
                </a>         
            </header>             
            <section class="art-description">
            </section>
        </article>
    </ItemTemplate>
</asp:ListView>
<!--<asp:ObjectDataSource ID="ODSArts" 
runat="server" 
TypeName="CLibArtreve.bll.ArtBLL"
DataObjectTypeName="CLibArtreve.models.Art"  
SelectMethod="GetArtById">
    <SelectParameters>
        <asp:Parameter Name="Id" DbType="Int64" Direction="Input" DefaultValue="-1" />
    </SelectParameters>
</asp:ObjectDataSource>-->
<asp:ObjectDataSource ID="ODSCategoriesALL" 
    runat="server" 
    TypeName="CLibArtreve.bll.CategoryBLL"
    DataObjectTypeName="CLibArtreve.models.Category"  
    SelectMethod="GetAllCategories"
    OnObjectCreating="ODSCategoriesALL_OnObjectCreating">
</asp:ObjectDataSource>